/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntityClass;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;

/**
 *
 * @author Ben
 */
@Entity(name="AppointmentBi")
public class Appointment implements Serializable {
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long Appid;
    
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date appDate;
    
    private String place;
    
    @ManyToOne
    private mCase mcase; // ??
   
    @ManyToOne
     private Patient patient;
    
    public Appointment(){}
    
    public void create(Date appDate, String place){
        this.setappDate(appDate);
        this.setPlace(place);
    }
    
    public Long getId() {
        return Appid;
    }

    public void setId(Long id) {
        this.Appid = id;
    }
        public Date getappDate() {
        return appDate;
    }

    public void setappDate(Date appDate) {
        this.appDate = appDate;
    }
    
    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }
    
    public Patient getPatient() {
        return patient;
    }

    public void setPatient(Patient patient) {
        this.patient = patient;
    }
}
